package website.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Api("用户实体类")
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "tb_user",autoResultMap = true)
public class User {


    private Integer uid;
    private String username;
    private String nickname;
    private String email;
    private String password;
    private String salt;
    private String phone;
    private String gender;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date birthday;
    private String signature;
    private String avatar;
    private String address;
    private String school;
    private String major;
    private String qq;
    private String introduce;
    private String content;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date registrationTime;
    private Integer deleted;

    @TableField(exist = false)
    private String code;

    @TableField(exist = false)
    private String token;
}
